using System.Linq;
using Script.Library.Ability;
using UnityEngine;

public class General : MonoBehaviour
{
	public GameObject cobweb;

	public GameObject meat;

	public GameObject round;

	public GameObject sonarController;

	public GameObject clawColliderObject;

	public Material camouflageMaterial;

	public GameObject poisonEffect;

	public GameObject healthBar;

	public GameObject[] mouth;

	public GameObject[] legs;

	public GameObject[] hands;

	public GameObject[] bodyParts;

	private void Awake()
	{
		Object.Destroy(base.gameObject);
		if (!Cobweb.cobweb)
		{
			Cobweb.cobweb = cobweb;
			Shooting.spine = round;
			Sonar.sonarController = sonarController;
			Claw.colliderObject = clawColliderObject;
			Camouflage.material = camouflageMaterial;
			Creature.poisonEffect = poisonEffect;
			Enemy.healthBarObject = healthBar;
			Info.meat = meat;
			Info.Body.mouth = mouth;
			GameObject[] source = legs.Concat(hands).Concat(bodyParts).ToArray();
			Info.Body.allParts = source.ToDictionary((GameObject o) => o.name);
		}
	}
}
